<script language="javascript">
<!--
var a = [1,2,3,4,5];
alert(a.slice(0,3)+"\n"+a.slice(3)+"\n"+a.slice(1,-1)+"\n"+a.slice(-3,-2));
//-->
</script>
